<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<form action="/emp/add.html" method="post">
    部门：<select name="dept.id">
    <c:forEach items="${deptList}" var="dept">
        <%--三目运算符--%>
        <option value="${dept.id}" ${employee.dept.id==dept.id?"selected":""}>${dept.name}</option>
    </c:forEach>
</select><br/>
    员工姓名：<input type="text" name="name" value="${employee.name}"/><br/>
    入职日期：<input type="text" name="hireDate" value="${param.hireDate}"/><br/>
    <input type="submit" value="提交">${message}
</form>
</body>
</html>
